package net.towee.client.widgets.upload;


public enum UploadError {
	FILE_SIZE_LIMIT(0),
	SERVER_ERROR(1),
	UNKNOWN(-1);

	private int value;
	private UploadError(int v) { this.value = v; }
	public int value() { return value; }
	
	public static UploadError fromString(String val) {
		if(val.equals("0")) return FILE_SIZE_LIMIT; 
		else if(val.equals("1")) return SERVER_ERROR;
		else return UNKNOWN;
	}
}
